#define _CRT_SECURE_NO_WARNINGS 1
int fib(int n) {
    long MOD = 1e9 + 7;
    if (n == 0)
        return 0;
    if (n == 1)
        return 1;
    int a = 0, b = 1, c;

    for (int i = 2; i <= n; i++)
    {
        c = (a + b) % MOD;
        a = b, b = c;
    }

    return c;

}